projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42142f0
)
Fix commit-msg to handle scissors lines
author
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 11 Apr 2015 02:12:16 +0000
(19:12 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 11 Apr 2015 02:12:16 +0000
(19:12 -0700)
* build-aux/git-hooks/commit-msg:
Ignore every line after a scissors line, such as a line generated
by 'git commit -v'. Problem reported by Johan Bockgård in:
http://lists.gnu.org/archive/html/emacs-devel/2015-04/msg00580.html
build-aux/git-hooks/commit-msg
patch
|
blob
|
history
diff --git
a/build-aux/git-hooks/commit-msg
b/build-aux/git-hooks/commit-msg
index 5b07b6c5d65e2bfcab2ee8454210ee535d8012f2..ea8d9098b378e0707041b4953630315ebafbb3c5 100755
(executable)
--- a/
build-aux/git-hooks/commit-msg
+++ b/
build-aux/git-hooks/commit-msg
@@
-62,7
+62,13
@@
exec $awk -v at_sign="$at_sign" -v cent_sign="$cent_sign" '
}
}
- /^#/ { next }
+ /^#/ {
+ # Ignore every line after a scissors line.
+ if (/^# *---* *(>[8%]|[8%]<) *---* *$/) { exit }
+
+ # Ignore comment lines.
+ next
+ }
!/^.*$/ {
print "Invalid character (not UTF-8) in commit message"